package comp3021.a1;

public class Product extends Base{
	
	private float Price;
	private int NumofUnit;
	public Product(){
		
	}
	public Product(String ItemID, String ItemName,float Price,int NumOfUnit)	//constructor
	{
		this.setKey(ItemID);
		this.setName(ItemName);
		this.Price = Price;
		this.NumofUnit = NumOfUnit;
	}
	
	public float howmuch()
	{
		return Price;
	}
	public int howmany()
	{
		return NumofUnit;
	}
	
	public void add(int more)
	{
		NumofUnit = NumofUnit+ more;
	}

	public void update(int number) {
		NumofUnit = NumofUnit - number;
	}

}

